<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script type="text/javascript">
		window.onload = function(){//文本节点
			var dv = document.getElementsByTagName('div')[0];
			console.log(dv.firstChild());
			console.log(dv.firstChild.wholeText);
		}
		</script>
		<title></title>
	</head>
	<body>
		<div>today is a good day</div>
	</body>
</html>
